-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore: don't accept multiple arguments in :LspStop/LspRestart #3896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: don't accept multiple arguments in :LspStop/LspRestart #3896
Conversation
I would prefer that neither of them supported multiple args. What is the use-case? These commands should not be used in scripts. Interactive usage is typically not going to specify multiple names. Scripts should use |
@justinmk that sounds good to me too, I just added this for consistency with the I personally don't have a use case, but I'm also not sure if we should change the behaviour of (if you agree feel free to close this PR 😀) |
We should make that change. The goal is to get the code in shape and then upstream it to core Nvim. |
dbf39bd
to
b0b2276
Compare
We don't want to support multiple arguments in the upcoming `:Lsp` multi-command, so remove this now from `:LspStop` and `:LspRestart`.
b0b2276
to
efc7246
Compare
@justinmk ok I changed this now! I hope nobody's relying on this, but I guess all these commands will get deprecated soon anyway 😀 I noticed that with Let me know if there's an easy way to avoid this, i.e still getting the split arguments in |
@@ -153,8 +153,8 @@ Most of the time, the reason for failure is present in the logs. | |||
|
|||
* `:LspInfo` (alias to `:checkhealth vim.lsp`) shows the status of active and configured language servers. | |||
* `:LspStart <config_name>` Start the requested server name. Will only successfully start if the command detects a root directory matching the current config. | |||
* `:LspStop [<client_id_or_name> ...]` Stops the given server(s). Defaults to stopping all servers active on the current buffer. To force stop add `++force` | |||
* `:LspRestart [<client_id_or_name> ...]` Restarts the given client(s), and attempts to reattach to all previously attached buffers. Defaults to restarting all active servers. | |||
* `:LspStop [<client_id_or_name>]` Stops the given server. Defaults to stopping all servers active on the current buffer. To force stop add `++force` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
off-topic/future: why didn't we use !
instead of ++force
to "force" ...?
desc = 'Disable and stop the given client(s)', | ||
nargs = '*', | ||
desc = 'Disable and stop the given client', | ||
nargs = '?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I thought it would simplify the implementation too :)
well, let's try it for now and see how it goes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we still need to handle multiple servers in the default case with no arguments 😀
Thanks for the merge!
Description
We don't want to support multiple arguments in the upcoming
:Lsp
multi-command, so remove this now from:LspStop
and:LspRestart
.Context